import request from '@/utils/request'
export default {
    //1 添加课程信息
    getAllChapter(courseId) {
        return request({
            url: '/eduservice/edu-chapter/getAllChapter/'+courseId,
            method: 'get'
          })
    },

    //添加章节
    addChapter(chapter){
        return request({
            url: '/eduservice/edu-chapter/addChapter/',
            method: 'post',
            data: chapter
        })
    },

    //根据id查询章节
    getChapterById(chapterId){
        return request({
            url: '/eduservice/edu-chapter/getChapterInfo/'+chapterId,
            method: 'get'
        })
    },

    //修改章节
    updateChapter(chapter){
        return request({
            url: '/eduservice/edu-chapter/updateChapter/',
            method: 'post',
            data:chapter
        })
    },

    //删除章节
    deleteChapter(chapterId){
        return request({
            url: '/eduservice/edu-chapter/deleteChapter/'+chapterId,
            method: 'get'
        })
    }
}